package com.hue.springbootvalidation.domain;

import com.hue.springbootvalidation.validation.SexValue;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString
public class User {
    private Integer id;

    @NotNull(message = "name不能为空")
    private String name;

    @NotNull(message = "password不能为空")
    private String password;

    @SexValue
    private String sex;
}
